package com.itany.corejava.day04;

import java.util.Arrays;

public class Test12 {

    public static void main(String[] args) {


        int[][] arr=new int[2][3];

        System.out.println(arr.length);
        System.out.println(arr[0].length);

        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr[i].length; j++) {
                System.out.print(arr[i][j]+"\t");
            }
            System.out.println();
        }

        System.out.println("arr[0] = " + arr[0]);
        System.out.println("arr[1] = " + arr[1]);

        System.out.println(Arrays.toString(arr[0]));
        System.out.println(Arrays.toString(arr[1]));

        int[][] arr2=new int[2][];

        System.out.println(Arrays.toString(arr2));

        arr2[0]=new int[]{1,2,3};
        arr2[1]=new int[]{4,5};

        for (int i = 0; i < arr2.length; i++) {
            for (int j = 0; j < arr2[i].length; j++) {
                System.out.print(arr2[i][j]+"\t");
            }
            System.out.println();
        }


        int[][] arr3={{1,2,3},
                      {4,5,6},
                      {7,8,9}};


        for (int i = 0; i < arr3.length; i++) {
            for (int j = 0; j < arr3[i].length; j++) {
                System.out.print(arr3[i][j]+"\t");
            }
            System.out.println();
        }














    }


}
